<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" layout:decorate="main"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>客户贡献分析</title>
    <link th:href="@{/localcss/crmlist.css}" href="../static/localcss/crmlist.css" rel="stylesheet">
</head>
<body>
    <div layout:fragment="content">
        <div class="x_panel">
            <div class="x_title">
                <h2>
                    客户贡献分析 <i class="fa fa-user"></i>
                    <small>
                        - 您可以通过搜索或者其他的筛选项对用户的贡献值查看。^_^
                    </small>
                </h2>
                <div class="clearfix"></div>
            </div>
            <div class="x_content">
                <form method="post" action="/contrRpt/list" th:action="@{/contrRpt/list}">
                    <input type="hidden" name="pageIndex" value="1"/>
                    <ul>
                        <li>
                            <div class="form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12">公司名称</label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input name="odrCustomer" type="text" th:value="${odrCustomer}"
                                           class="form-control col-md-6 col-xs-12" value="">
                                </div>
                            </div>
                        </li>
                        <li>
                            <button type="submit" class="btn btn-primary"> 查 &nbsp;&nbsp;&nbsp;&nbsp;询
                            </button>
                        </li>
                    </ul>
                </form>
            </div>
        </div>
        <div id="ect" style="width: 1000px;height:600px; top: 30px"></div>
        <script th:src="@{../js/echarts.min.js}" src="../js/echarts.min.js"></script>
        <script type="text/javascript" th:inline="javascript">
            // 基于准备好的dom，初始化echarts实例
            var myChart = echarts.init(document.getElementById('ect'));
            var cutName = [[${name}]]
            var money = [[${money}]]
            var priceYear = [[${priceYear}]]
            // 指定图表的配置项和数据
            var option = {
                title: {
                    text: '用户统计图表'
                },
                tooltip: {},
                legend: {
                    data: ['总交易金额','近一年交易金额']
                },
                xAxis: {
                    data: cutName
                },
                yAxis: {},
                series: [
                    {
                        name: '总交易金额',
                        type: 'bar',
                        data: money
                    },
                    {
                        name: "近一年交易金额",
                        type: 'bar',
                        data: priceYear
                    }
                ]
            };

            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option);
        </script>
    </div>
</body>
</html>